package com.atguigu.gmall.rabbit.component;

import com.atguigu.gmall.model.mq.to.order.OrderCreateMsg;
import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;

import java.io.IOException;

/**
 * @Author:lyd
 **/
public interface RabbitService {
    /**
     * 发送创建订单的消息
     * @param exchange
     * @param routingKey
     * @param msg
     */
    void sendMsg(String exchange, String routingKey, Object msg);

    /**
     * 重试
     * @param message
     * @param channel
     */
    void retry(Message message, Channel channel,int count) throws IOException;
}
